CREATE TABLE [dbo].[TTUSER_CAJA]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_CAJA] [dbo].[TD_VC_008] NOT NULL,
[NU_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTUSER_CA__NU_CO__12549193] DEFAULT ((0)),
[CO_USUA] [dbo].[TD_VC_008] NOT NULL,
[ST_MANT_INEG] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTUSER_CA__ST_MA__1348B5CC] DEFAULT ('N'),
[ST_REPO] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTUSER_CA__ST_RE__1530FE3E] DEFAULT ('N'),
[ST_AUTO_EGRE] [dbo].[TD_VC_001_SINO] NULL CONSTRAINT [DF__TTUSER_CA__ST_AU__171946B0] DEFAULT ('N'),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTUSER_CA__CO_US__19018F22] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTUSER_CA__FE_US__19F5B35B] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TTUSER_CA__CO_US__1AE9D794] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TTUSER_CA__FE_US__1BDDFBCD] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTUSER_CAJA] WITH NOCHECK ADD CONSTRAINT [CK__TTUSER_CA__ST_AU__180D6AE9] CHECK NOT FOR REPLICATION (([ST_AUTO_EGRE]='N' OR [ST_AUTO_EGRE]='S'))
GO
ALTER TABLE [dbo].[TTUSER_CAJA] WITH NOCHECK ADD CONSTRAINT [CK__TTUSER_CA__ST_MA__143CDA05] CHECK NOT FOR REPLICATION (([ST_MANT_INEG]='N' OR [ST_MANT_INEG]='S'))
GO
ALTER TABLE [dbo].[TTUSER_CAJA] WITH NOCHECK ADD CONSTRAINT [CK__TTUSER_CA__ST_RE__16252277] CHECK NOT FOR REPLICATION (([ST_REPO]='N' OR [ST_REPO]='S'))
GO
ALTER TABLE [dbo].[TTUSER_CAJA] ADD CONSTRAINT [PK__TTUSER_C__D564F00E4F138710] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_CAJA], [NU_CORR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTUSER_CAJA] ADD CONSTRAINT [FK__TTUSER_CAJA__7F4CAA17] FOREIGN KEY ([CO_EMPR], [CO_CAJA]) REFERENCES [dbo].[TMCAJA] ([CO_EMPR], [CO_CAJA])
GO
